from flask import Flask, request

app = Flask(__name__)


@app.route('/')
def hello_world():
    return 'hello world'


@app.route('/axios-get')
def axios_get():
    page = open('axios-get.html', encoding='utf-8')
    res = page.read()
    return res

@app.route('/axios-post')
def axios_post():
    page = open('axios-post.html', encoding='utf-8')
    res = page.read()
    return res

@app.route('/getT', methods=['get'])
def getT():
    return request.args

@app.route('/postT', methods=['post'])
def postT():
    return request.form

if __name__ == '__main__':
    app.run(port=8888, debug=True)
